package vip.xiaonuo.modular.config;

import org.redisson.api.RedissonClient;
import org.redisson.spring.cache.CacheConfig;
import org.redisson.spring.cache.RedissonSpringCacheManager;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Configuration
@ComponentScan
@EnableCaching
public class RedisConfigManager {

    @Bean
    CacheManager cacheManager(RedissonClient redissonClient) {
        RedissonSpringCacheManager manager = new RedissonSpringCacheManager(redissonClient);
        return manager;
    }


}